//
//  ZNWBWebViewController.swift
//  ZNWeibo
//
//  Created by FunctionMaker on 2017/9/20.
//  Copyright © 2017年 FunctionMaker. All rights reserved.
//

import UIKit

class ZNWBWebViewController: ZNWBBaseViewController {
    var urlString: String? {
        didSet {
            guard let urlString = urlString,
                  let url = URL(string: urlString)
            else {
                return
            }
            
            webView.loadRequest(URLRequest(url: url))
        }
    }
    
    private lazy var webView = UIWebView(frame: UIScreen.main.bounds)
    
    /// 去除table view
    override func setupTableView() {
        zn_navigationItem.title = "网页详情"
        
        view.insertSubview(webView, belowSubview: navigationBar)
        webView.backgroundColor = UIColor.white
        webView.scrollView.contentInset.top = navigationBar.bounds.height
    }
}

